<?php
namespace addon\wechat_config\controller;

use app\common\controller\AddonAdminBase;
use tpfcore\Core;

class WechatConfig extends AddonAdminBase
{
    public function index(){
        $this->addonTemplate('index',[
            'info'=>Core::loadAddonModel($this->name)->getWechatConfigInfo()
        ]);
    }

    public function save(){
    	IS_POST && $this->jump(Core::loadAddonModel($this->name)->saveWechatConfig($this->param['info']));
    }

    public function server_config(){
    	$this->addonTemplate('interface',[
            'info'=>Core::loadAddonModel($this->name)->getWechatConfigInfo()
    	]);
    }
}
